package com.casstime.ec.cloud.discount.dao.gift;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.casstime.ec.cloud.dao.jpa.mybatis.Mapper;
import com.casstime.ec.cloud.values.giftPromotion.GiftProduct;
import com.casstime.ec.cloud.values.giftPromotion.GiftRequest;
/**
 * ClassName: AfterSalesPolicyMapper 
 * Function: (买赠促销实体查询DAO)
 * Reason: ADD REASON(可选).
 *  
 * @author wu.chen 
 * 2018年1月30日 上午11:17:38
 * @version   
 * @since JDK 1.8
 */
@SuppressWarnings("rawtypes")
public interface GiftProductMapper extends Mapper {
	
	int insertOrUpdateGiftProduct(@Param("gift") GiftProduct gift);
	
	List<GiftProduct> listGiftProducts(@Param("param") GiftRequest param);
	
	int updateOnsaleStatus(@Param("giftIds") List<String> giftIds, @Param("onsaleStatus") String onsaleStatus);
	
	List<GiftProduct> findGiftProductByIds(@Param("giftIds")  List<String> giftIds);
	
	GiftProduct findGiftProductById(@Param("giftId")  String giftId);
	
	GiftProduct findGiftProductByCode(@Param("giftCode")  String giftCode, @Param("productStoreId")  String productStoreId);
	
}
